<?php
/**
 * 资产包尽调评估——1、立项信息编辑（编辑）
 * User: zhoa shou qiang
 * Date: 2018/1/9 0009
 * Time: 10:48
 */
?>

<form class="form-horizontal col-md-12" name="base_info_form" id="base_info_form_edit">
    <div class="form-group">
        <label for="inputText1" class="pull-left control-label">资产包名称</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control" name="Package[title]" value="<?PHP echo $data['title'] ?>">
        </div>
    </div>
    <!-- 2 -->
    <!--        <div class="form-group">-->
    <!--            <label class="pull-left control-label">公开部门</label>-->
    <!--            <div class="pull-left label-div label-div2">-->
    <!--                <p class="form-control-static">--><?php //echo $data['access_users'];?><!--</p>-->
    <!--            </div>-->
    <!--        </div>-->
    <!-- 3 -->
    <div class="form-group">
        <label for="" class="pull-left control-label">资产包类型</label>
        <div class="pull-left label-div package_initation_type">
            <button type="button" data-type="1"
                    class="btn <?php echo $data['type'] == 1 ? 'btn-primary' : 'btn-default'; ?> perfect-information-btn btns-primary"
                    onclick="type_select(1)">保证类
            </button>
            <button type="button" data-type="2"
                    class="btn <?php echo $data['type'] == 2 ? 'btn-primary' : 'btn-default'; ?> perfect-information-btn btns-primary"
                    onclick="type_select(2)" >抵押类
            </button>
            <button type="button" data-type="3"
                    class="btn <?php echo $data['type'] == 3 ? 'btn-primary' : 'btn-default'; ?> perfect-information-btn btns-primary"
                    onclick="type_select(3)">混合类
            </button>
        </div>
        <input type="hidden" name="Package[type]" id="package_type" value="<?php  echo $data['type'];?>"/>
    </div>
    <!-- 4 -->
    <div class="form-group">
        <label for="inputText4" class="pull-left control-label">债权人名称</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control" name="Package[creditor]" value="<?php echo $data['creditor'] ?>">
        </div>
    </div>
    <!-- 5 -->
    <div class="form-group">
        <label for="inputText5" class="pull-left control-label">省份地区</label>
        <div class="pull-left label-div">
            <select class="pull-left form-control area-select" name="Package[province]" id="province"
                    onchange="select_change(this.options[this.options.selectedIndex].value)" >

                <?php
                if ($data['province'] == 0) {
                    $province = '<option selected value="0">--请选择省--</option>';
                } else {
                    $province = '<option value="0">--请选择省--</option>';
                }
                if (!empty($countryList['province'] && is_array($countryList['province']))) {
                    foreach ($countryList['province'] as $value) {
                        if ($data['province'] == $value['id']) {
                            $province .= '<option selected value="' . $value['id'] . '">' . $value['title'] . '</option>';
                        } else {
                            $province .= '<option value="' . $value['id'] . '">' . $value['title'] . '</option>';
                        }
                    }
                }
                echo $province;
                ?>
            </select>

            <select class="pull-left form-control area-select2" multiple="multiple" name="Package[city][]" id="city">
                <?php
                if ($data['city'] == 0) {
                    $city = '<option selected value="0">--请选择城市--</option>';
                } else {
                    $city = '<option value="0">--请选择城市--</option>';
                }

                if (!empty($countryList['city']) && is_array($countryList['city'])) {
                    $cityData = explode(',', $data['city']);
                    foreach ($countryList['city'] as $val) {
                        if ($val['id'] > 0) {
                            if (in_array($val['id'], $cityData)) {
                                //if ($val['id'] == $data['city']) {
                                $city .= '<option selected value="' . $val['id'] . '">' . $val['title'] . '</option>';
                            } else {
                                $city .= '<option value="' . $val['id'] . '">' . $val['title'] . '</option>';
                            }
                        }
                    }
                }
                echo $city;
                ?>
            </select>
        </div>
    </div>
    <!-- 6 -->
    <div class="form-group">
        <label for="inputTex6" class="pull-left control-label">本金（元）</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control package_info_principal" name="Package[principal]" id="principal" isNumber="true" onkeydown="true" value="<?php echo $data['principal'] ?>">
        </div>
    </div>
    <!-- 7 -->
    <div class="form-group">
        <label for="inputText7" class="pull-left  control-label">利息（元）</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control package_info_interest" name="Package[interest]" id="interest" isNumber="true" onkeydown="true" value="<?php echo $data['interest'] ?>">
        </div>
    </div>
    <!-- 8 -->
    <div class="form-group">
        <label for="inputText8" class="pull-left control-label">剩余户数</label>
        <div class="pull-left label-div">
            <input type="text" class="form-control package_info_hushu" name="Package[hushu]" id="hushu" isNumber="true" onkeydown="true" value="<?php echo $data['hushu'] ?>">
        </div>
    </div>
    <!-- 9 -->
    <div class="form-group">
        <label for="" class="pull-left control-label">未诉债权时效 </br>及催收方式</label>
        <div class="pull-left label-div">
            <!-- <input type="text" class="form-control" name="Package[limit_collection]"
                   value="<?php echo $data['limit_collection'] ?>">
                    -->
            <textarea class="form-control textarea-edit" style="min-height: 34px;"  name="Package[limit_collection]" ><?php echo $data['limit_collection'] ?></textarea>
        </div>
    </div>
    <div class="form-group">
        <label for="" class="pull-left control-label">资产包信息来源</label>
        <div class="pull-left label-div">
            <!-- <input type="text" class="form-control" name="Package[origin]" value="<?php echo $data['origin'] ?>"> -->
            <textarea class="form-control textarea-edit" style="min-height: 34px;"  name="Package[origin]" ><?php echo $data['origin'] ?></textarea>

        </div>
    </div>
    <div class="form-group">
        <label for="inputText9" class="pull-left  control-label">详细说明</label>
        <div class="pull-left label-div label-div2">
            <!-- <textarea class="form-control" rows="9" name="Package[detail]"><?php echo $data['detail'] ?></textarea> -->
            <textarea class="form-control textarea-edit" style="min-height: 34px;"  name="Package[detail]" ><?php echo $data['detail'] ?></textarea>
        </div>
    </div>
    <!-- 10 -->
    <div class="btns">
        <button type="button" class="btn btn-primary perfect-information-btn btns-primary btns-primary-save pull-right save_initation">保存</button>
        <button type="reset" class="btn btn-default perfect-information-btn btns-primary btns-primary-del pull-right cancle_initation">取消</button>
    </div>
</form>

<script type="text/javascript">
    $(document).ready(function(){
        $('#city').select2({
            language: "zh-CN",  //设置 提示语言
            width: '240px', //设置下拉框的宽度
            tokenSeparators: [',', ' '],
            placeholder: "请选择城市",  //提示语
            maximumSelectionLength :30,   //限制搜索的个数
            tags: false                //可以手动添加，若限制手动添加，设置为false
        })

        $('#province').select2({
            language: "zh-CN",  //设置 提示语言
            width: '240px', //设置下拉框的宽度
            tokenSeparators: [',', ' '],
            placeholder: "请选择省",  //提示语
            //maximumSelectionLength :30,   //限制搜索的个数
            tags: false                //可以手动添加，若限制手动添加，设置为false
        })
    });


</script>